package com.punai.externalccb.domain;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.punai.common.core.text.Convert;
import com.punai.common.utils.SubBigDecimalTypeHandler;
import com.punai.externalccb.bo.BidNodeBO;
import com.punai.prodatalibrary.domain.LibProject;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.punai.common.annotation.Excel;
import com.punai.common.core.domain.BaseEntity;

/**
 * bidnode对象 eco_bidnode
 *
 * @author zxw
 * @date 2023-04-10
 */
public class EcoBidnode extends BaseEntity {


    /**
     * $column.columnComment
     */
    private String id;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Integer oid;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Integer pid;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String nodecode;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String nodename;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String nodeidxcode;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Integer nodeidx;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    @TableField(typeHandler = SubBigDecimalTypeHandler.class)
    private BigDecimal amount;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private BigDecimal fbqdrate;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private BigDecimal csrate;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private BigDecimal qtrate;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private BigDecimal gfrate;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    @TableField(typeHandler = SubBigDecimalTypeHandler.class)
    private BigDecimal sjrate;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String standard;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Integer nodetype;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String trade;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private BigDecimal fjsrate;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private BigDecimal aqwmrate;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private BigDecimal ylfrate;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private BigDecimal zjcsrate;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Integer isnewdata;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Integer glffl;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Integer zzsl;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Integer gffl;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Integer lrfl;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String proId;

    /**
     * 利润
     */
    @Excel(name = "利润")
    private BigDecimal profit;

    /**
     * 工程设备费
     */
    @Excel(name = "工程设备费")
    private BigDecimal gcsbf;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private BigDecimal zcf;

    /**
     * 下浮金额
     */
    @Excel(name = "下浮金额")
    private BigDecimal floatdown;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String stagetype;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private BigDecimal zzsfjs;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private BigDecimal ysrgftz;

    public EcoBidnode() {
    }

    public EcoBidnode(String proId, String stagetype) {
        this.proId = proId;
        this.stagetype = stagetype;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setOid(Integer oid) {
        this.oid = oid;
    }

    public Integer getOid() {
        return oid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public Integer getPid() {
        return pid;
    }

    public void setNodecode(String nodecode) {
        this.nodecode = nodecode;
    }

    public String getNodecode() {
        return nodecode;
    }

    public void setNodename(String nodename) {
        this.nodename = nodename;
    }

    public String getNodename() {
        return nodename;
    }

    public void setNodeidxcode(String nodeidxcode) {
        this.nodeidxcode = nodeidxcode;
    }

    public String getNodeidxcode() {
        return nodeidxcode;
    }

    public void setNodeidx(Integer nodeidx) {
        this.nodeidx = nodeidx;
    }

    public Integer getNodeidx() {
        return nodeidx;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setFbqdrate(BigDecimal fbqdrate) {
        this.fbqdrate = fbqdrate;
    }

    public BigDecimal getFbqdrate() {
        return fbqdrate;
    }

    public void setCsrate(BigDecimal csrate) {
        this.csrate = csrate;
    }

    public BigDecimal getCsrate() {
        return csrate;
    }

    public void setQtrate(BigDecimal qtrate) {
        this.qtrate = qtrate;
    }

    public BigDecimal getQtrate() {
        return qtrate;
    }

    public void setGfrate(BigDecimal gfrate) {
        this.gfrate = gfrate;
    }

    public BigDecimal getGfrate() {
        return gfrate;
    }

    public void setSjrate(BigDecimal sjrate) {
        this.sjrate = sjrate;
    }

    public BigDecimal getSjrate() {
        return sjrate;
    }

    public void setStandard(String standard) {
        this.standard = standard;
    }

    public String getStandard() {
        return standard;
    }

    public void setNodetype(Integer nodetype) {
        this.nodetype = nodetype;
    }

    public Integer getNodetype() {
        return nodetype;
    }

    public void setTrade(String trade) {
        this.trade = trade;
    }

    public String getTrade() {
        return trade;
    }

    public void setFjsrate(BigDecimal fjsrate) {
        this.fjsrate = fjsrate;
    }

    public BigDecimal getFjsrate() {
        return fjsrate;
    }

    public void setAqwmrate(BigDecimal aqwmrate) {
        this.aqwmrate = aqwmrate;
    }

    public BigDecimal getAqwmrate() {
        return aqwmrate;
    }

    public void setYlfrate(BigDecimal ylfrate) {
        this.ylfrate = ylfrate;
    }

    public BigDecimal getYlfrate() {
        return ylfrate;
    }

    public void setZjcsrate(BigDecimal zjcsrate) {
        this.zjcsrate = zjcsrate;
    }

    public BigDecimal getZjcsrate() {
        return zjcsrate;
    }

    public void setIsnewdata(Integer isnewdata) {
        this.isnewdata = isnewdata;
    }

    public Integer getIsnewdata() {
        return isnewdata;
    }

    public void setGlffl(Integer glffl) {
        this.glffl = glffl;
    }

    public Integer getGlffl() {
        return glffl;
    }

    public void setZzsl(Integer zzsl) {
        this.zzsl = zzsl;
    }

    public Integer getZzsl() {
        return zzsl;
    }

    public void setGffl(Integer gffl) {
        this.gffl = gffl;
    }

    public Integer getGffl() {
        return gffl;
    }

    public void setLrfl(Integer lrfl) {
        this.lrfl = lrfl;
    }

    public Integer getLrfl() {
        return lrfl;
    }

    public void setProId(String proId) {
        this.proId = proId;
    }

    public String getProId() {
        return proId;
    }

    public void setProfit(BigDecimal profit) {
        this.profit = profit;
    }

    public BigDecimal getProfit() {
        return profit;
    }

    public void setGcsbf(BigDecimal gcsbf) {
        this.gcsbf = gcsbf;
    }

    public BigDecimal getGcsbf() {
        return gcsbf;
    }

    public void setZcf(BigDecimal zcf) {
        this.zcf = zcf;
    }

    public BigDecimal getZcf() {
        return zcf;
    }

    public void setFloatdown(BigDecimal floatdown) {
        this.floatdown = floatdown;
    }

    public BigDecimal getFloatdown() {
        return floatdown;
    }

    public void setStagetype(String stagetype) {
        this.stagetype = stagetype;
    }

    public String getStagetype() {
        return stagetype;
    }

    public void setZzsfjs(BigDecimal zzsfjs) {
        this.zzsfjs = zzsfjs;
    }

    public BigDecimal getZzsfjs() {
        return zzsfjs;
    }

    public void setYsrgftz(BigDecimal ysrgftz) {
        this.ysrgftz = ysrgftz;
    }

    public BigDecimal getYsrgftz() {
        return ysrgftz;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("oid", getOid())
                .append("pid", getPid())
                .append("nodecode", getNodecode())
                .append("nodename", getNodename())
                .append("nodeidxcode", getNodeidxcode())
                .append("nodeidx", getNodeidx())
                .append("amount", getAmount())
                .append("fbqdrate", getFbqdrate())
                .append("csrate", getCsrate())
                .append("qtrate", getQtrate())
                .append("gfrate", getGfrate())
                .append("sjrate", getSjrate())
                .append("standard", getStandard())
                .append("nodetype", getNodetype())
                .append("trade", getTrade())
                .append("fjsrate", getFjsrate())
                .append("aqwmrate", getAqwmrate())
                .append("ylfrate", getYlfrate())
                .append("zjcsrate", getZjcsrate())
                .append("isnewdata", getIsnewdata())
                .append("glffl", getGlffl())
                .append("zzsl", getZzsl())
                .append("gffl", getGffl())
                .append("lrfl", getLrfl())
                .append("proId", getProId())
                .append("profit", getProfit())
                .append("gcsbf", getGcsbf())
                .append("zcf", getZcf())
                .append("floatdown", getFloatdown())
                .append("stagetype", getStagetype())
                .append("zzsfjs", getZzsfjs())
                .append("ysrgftz", getYsrgftz())
                .append("createBy", getCreateBy())
                .append("updateBy", getUpdateBy())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .toString();
    }

    public static EcoBidnode convert(BidNodeBO bidNodeBO, String stagetype, LibProject project) {
        EcoBidnode bidNode = new EcoBidnode();
        bidNode.setOid(bidNodeBO.getID());
        bidNode.setPid(bidNodeBO.getPID());
        bidNode.setNodecode(bidNodeBO.getNodeCode());
        bidNode.setNodename(bidNodeBO.getNodeName());
        bidNode.setNodeidxcode(bidNodeBO.getNodeIdxCode());
        bidNode.setNodeidx(bidNodeBO.getNodeIdx());
        bidNode.setAmount(bidNodeBO.getAmount());
        bidNode.setFbqdrate(bidNodeBO.getFBQDRate());
        bidNode.setCsrate(bidNodeBO.getCSRate());
        bidNode.setQtrate(bidNodeBO.getQTRate());
        bidNode.setGfrate(bidNodeBO.getGFRate());
        bidNode.setSjrate(bidNodeBO.getSJRate());
        bidNode.setStandard(bidNodeBO.getStandard());
        bidNode.setNodetype(bidNodeBO.getNodeType());
        bidNode.setTrade(bidNodeBO.getTrade());
        bidNode.setFjsrate(Convert.toBigDecimal(bidNodeBO.getFJSRate()));
        bidNode.setAqwmrate(bidNodeBO.getAQWMRate());
        bidNode.setYlfrate(bidNodeBO.getYLFRate());
        bidNode.setZjcsrate(bidNodeBO.getZJCSRate());
        bidNode.setIsnewdata(Convert.toInt(bidNodeBO.getIsNewData()));
        bidNode.setGlffl(Convert.toInt(bidNodeBO.getGlfFl()));
        bidNode.setZzsl(Convert.toInt(bidNodeBO.getZzsl()));
        bidNode.setGffl(Convert.toInt(bidNodeBO.getGfFl()));
        bidNode.setLrfl(Convert.toInt(bidNodeBO.getLrFl()));
        bidNode.setProfit(bidNodeBO.getProfit());
        bidNode.setGcsbf(bidNodeBO.getGCSBF());
        bidNode.setYsrgftz(bidNodeBO.getYsRGFTZ());
        bidNode.setFloatdown(bidNodeBO.getFloatDown());
        bidNode.setStagetype(stagetype);
        bidNode.setProId(project.getId());
        return bidNode;
    }

}
